-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
feat: Support vue.config.ts #6820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the usage of esbuild
:
Seems overkill for an opt-in feature. How about using typescript.transpileModule
and list typescript
as an optional peer dependency (which will be installed if the user installs @vue/cli-plugin-typescript
)?
Regarding the test error:
Maybe caused by deleting require.cache
?
Anyway, it seems a jest-only quirk. You can add whatever workaround you need in the if (process.env.VUE_CLI_TEST
condition to make jest happy.
Okay, I'll think about your suggestion and Solve the error of jest |
One of the reasons I use for example
|
Yeah, I agree there are a lot of possibilities if we bring in esbuild. We can add it later when we have more convincing use cases. |
In this case,
This change won't improve the test speed of the Vue CLI project itself. For user projects, yeah, I think this use case is worth investigating. But we can implement a separate jest preset with
Not now. It must be opt-in for Vue CLI at this moment because the speed of esbuild comes with tradeoffs. |
The reason why we do not want to add yarn init -y && yarn add esbuild
open node_modules This size is all its influence on node_moduels 👇, But the size of typescript is 63M The size change of 8M is not difficult to accept for user For Vue CLI5, I think we can add some current popular tools. This is a growing development trend 😄, and in the future we don’t need to replace the tools developed based on typescript with esbuild. I think we can introduce changes more optimistically |
There's a bug in yarn v1 that it will download all dependencies regardless of their |
But typescript is a peer dependency. |
I'm more than happy to accept these changes. But I prefer an opt-in way because of the maintenance burden. For example, it would be cool to have an But I don't see any immediate benefit of including it in |
Let me think about how to convince you🤔. If it is not possible I , I will use |
@screetBloom Can you also add |
Can this point add some convincing ?
see here 👉 vite config file resolving |
I finally found out why I don't feel right about this implementation: Vite's implementation is not the ideal example. We really don't need esbuild for this simple feature. Again, I'm not against adding esbuild to Vue CLI. I'm just against using it for this feature. |
Okay, one last question, do you prefer to use
I will finish it as soon as possible |
Either is fine to me. Whichever you choose, please add it to the peer dependencies list and mark it as optional. |
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
Other information
It would be great to use
.ts
suffix configuration files in TypeScript projects